package HomeWork;
/*
 *@auther will
 *@version 1.0
 */

import javax.swing.plaf.synth.SynthOptionPaneUI;

public class Homework08 {
    public static void main(String[] args) {
        Color green = Color.GREEN;
        green.show();
        switch (green){
            case GREEN:
                System.out.println("匹配到绿色");break;
        }
    }
}

interface IMyInterface{
    public void show();
}
enum Color implements IMyInterface{
    RED(255,0,0),BLUE(0,0,255),GREEN(0,255,0);
    private int redValue;
    private int greenValue;
    private int blueValue;

    Color(int redValue, int greenValue, int blueValue) {
        this.redValue = redValue;
        this.greenValue = greenValue;
        this.blueValue = blueValue;
    }

    @Override
    public void show() {
        System.out.println("Color{" +
                "redValue=" + redValue +
                ", greenValue=" + greenValue +
                ", blueValue=" + blueValue +
                '}');
    }

}